package cn.aitrox.ry.service.user.enumtype;

public enum UserOprateTypeEnum {

    STATUS_UPDATE(1, "修改状态"),
    PWD_UPDATE(2, "修改密码");

    private Integer type;

    private String desc;

    UserOprateTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public Integer getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static UserOprateTypeEnum getEnumByType(Integer type) {
        if (null == type) {
            return null;
        }
        for (UserOprateTypeEnum typeEnum : UserOprateTypeEnum.values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum;
            }
        }
        return null;
    }

}
